﻿<!-- Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information. -->
<SettingsFlyout
    x:Class="Weathr.SettingsFlyout"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Weathr"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    IconSource="Assets/WeathrSmallLogo.png"
    Title="Options"
    HeaderBackground="DarkGreen"
    Loaded="SettingsFlyout_Loaded"
    Unloaded="SettingsFlyout_Unloaded"
    d:DesignWidth="346">
    <SettingsFlyout.Resources>
        <Style x:Key="SettingsFlyoutSectionStyle" TargetType="StackPanel">
            <Setter Property="Margin" Value="0,0,0,39"/>
        </Style>
    </SettingsFlyout.Resources>

    <!-- This StackPanel acts as a root panel for vertical layout of the content sections -->
    <StackPanel VerticalAlignment="Stretch" HorizontalAlignment="Stretch" >

        <!-- The StackPanels below define individual content sections -->

        <!-- Temperature unit -->
        <StackPanel Style="{StaticResource SettingsFlyoutSectionStyle}">
            <TextBlock Style="{StaticResource SubheaderTextBlockStyle}" Margin="0,0,0,10" Text="Units"/>
            <RadioButton IsChecked="{Binding IsCelsiusSet, Mode=TwoWay}" Margin="0,0,0,10" Content="Celsius"/>
            <RadioButton IsChecked="{Binding IsFahrenheitSet, Mode=TwoWay}" Content="Fahrenheit"/>
        </StackPanel>

        <!-- Display -->
        <StackPanel Style="{StaticResource SettingsFlyoutSectionStyle}">
            <TextBlock Style="{StaticResource SubheaderTextBlockStyle}" Margin="0,0,0,5" Text="Display"/>
            <TextBlock Style="{StaticResource TitleTextBlockStyle}" Text="Diagnostics"/>
            <ToggleSwitch IsOn="{Binding ShowDebugOutput, Mode=TwoWay}"/>
            <TextBlock Style="{StaticResource TitleTextBlockStyle}" Text="Weather Effects"/>
            <ToggleSwitch IsOn="{Binding ShowWeatherEffects, Mode=TwoWay}"/>
            <TextBlock Style="{StaticResource TitleTextBlockStyle}" Text="Stars"/>
            <ToggleSwitch IsOn="{Binding ShowStarfield, Mode=TwoWay}"/>
        </StackPanel>

        <!-- Privacy-->
        <StackPanel Style="{StaticResource SettingsFlyoutSectionStyle}">
            <!-- The provided URL is just an example. Replace with your own privacy statement. -->
            <HyperlinkButton Margin="-10,0,0,0" Content="View privacy statement" NavigateUri="http://privacy.microsoft.com"/>
        </StackPanel>

    </StackPanel>
</SettingsFlyout>
